define(["jquery"], function($) {
    
    $(document).ready(function() {
        console.log("DOM IS READY");

        $("#jqredy .listening").css("display", "none");
        $("#jqredy .received").css("display", "block");

        document.addEventListener('deviceready', function() {
            console.log("CORDOVA IS READY");

            $("#deviceready .listening").css("display", "none");
            $("#deviceready .received").css("display", "block");
        }, false);

        /*$(document).on("deviceready", function() {
         console.log("CORDOVA IS READY");
         
         $("#deviceready .listening").css("display", "none");
         $("#deviceready .received").css("display", "block");
         });*/

        $("#start-button").on("tap", function() {
            console.log("TAP START BUTTON");

            require(["controllers/first-page"], function(controller) {
                $.mobile.pageContainer.pagecontainer("change", "first-page.html");
            });

        });
    });

});